Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate wazuh.yml configuration to opensearch_dashboards.yml #7175

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

Machi3mfl
Copy link
Member

@Machi3mfl Machi3mfl commented Nov 25, 2024

Description

This PR move the location of the wazuh.yml to opensearch_dashboards.yml

Closes wazuh/wazuh-dashboard#339

Test

Check the Dashboard Management > Advanced settings validations

Field Type Validations Chrome Firefox Safari 
alerts.sample.prefix EpluginSettingType.text - String
- notEmpty
- noSpaces
- noStartsWith('-', '_', '+', '.')
- noInvalidCharacters('\', '/', '?', '"', '<', '>', '#', '*')
configuration.ui_api_editable EpluginSettingType.switch - Boolean
cron.prefix EpluginSettingType.text - String
- notEmpty
- noSpaces
- noStartsWith('-', '_', '+', '.')
- noInvalidCharacters('\', '/', '?', '"', '<', '>','#', '*')
customization.enabled EpluginSettingType.switch - Boolean
enrollment.dns EpluginSettingType.text - String
- serverAddressHostnameFQDNIPv4IPv6
enrollment.password EpluginSettingType.text - String
hideManagerAlerts EpluginSettingType.switch - Boolean
ip.ignore EpluginSettingType.editor - Array of:
- String
- notEmpty
- noSpaces
- noLiteralString('.', '..')
- noStartsWith('-', '_', '+', '.')
- noInvalidCharacters('\', '/', '?', '"', '<', '>', '#')
ip.selector EpluginSettingType.switch - Boolean
wazuh.updates.disabled EpluginSettingType.switch - Boolean
pattern EpluginSettingType.text - String
- notEmpty
- noSpaces
- noLiteralString('.', '..')
- noStartsWith('-', '_', '+', '.')
- noInvalidCharacters('\', '/', '?', '"', '<', '>', '#')
timeout EpluginSettingType.number - Number (min: 1500, integer)
vulnerabilities.pattern EpluginSettingType.text - String
- notEmpty
- noSpaces
- noLiteralString('.', '..')
- noStartsWith('-', '_', '+', '.')
- noInvalidCharacters('\', '/', '?', '"', '<', '>', ',', '#')

Check the opensearch_dashboards.yml validations

Field Type Validations Chrome Firefox Safari 
hosts EpluginSettingType.objectOf url:
- String
- notEmpty
port:
- Number (0-65535)
username:
- String
- notEmpty
password:
- String
- notEmpty
run_as:
- Boolean

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.71% ( 400 / 875 )
Branches 41.97% ( 157 / 374 )
Functions 44.01% ( 136 / 309 )
Lines 45.9% ( 398 / 867 )

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Main plugin code coverage (Jest) test % values
Statements 13.43% ( 4027 / 29984 )
Branches 8.96% ( 1749 / 19516 )
Functions 12.98% ( 944 / 7270 )
Lines 13.59% ( 3925 / 28861 )

@Machi3mfl Machi3mfl marked this pull request as ready for review December 20, 2024 19:27
Copy link
Contributor

Wazuh Engine plugin code coverage (Jest) test % values
Statements 8.63% ( 64 / 741 )
Branches 7.94% ( 22 / 277 )
Functions 1.87% ( 7 / 373 )
Lines 9.1% ( 64 / 703 )

Copy link
Contributor

Wazuh Fleet plugin code coverage (Jest) test % values
Statements 4.68% ( 9 / 192 )
Branches 16.66% ( 7 / 42 )
Functions 1.11% ( 1 / 90 )
Lines 4.76% ( 9 / 189 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.44% ( 172 / 225 )
Branches 58.65% ( 61 / 104 )
Functions 61.7% ( 29 / 47 )
Lines 76.44% ( 172 / 225 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate wazuh.yml configuration to opensearch_dashboard.yml
1 participant